using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace System.IPod.Photo
{
	struct Mhfd
	{
		public byte[] Identifier; // mhfd 6D 68 66 64
		public int HeaderLength;
		public int TotalLength;
		public int Unknown1;
		public int Unknown2;
		public int ChildCount;
		public int Unknown3;
		public int NexMhiiId;
		public long Unknown5;
		public long Unknown6;
		public int Unknown7;
		public int Unknown8;
		public int Unknown9;
		public int Unknown10;
		public int Unknown11;

		public void Read(BinaryReader reader)
		{
			Identifier = reader.ReadBytes(4);
			HeaderLength = reader.ReadInt32();
			TotalLength = reader.ReadInt32();
			Unknown1 = reader.ReadInt32();
			Unknown2 = reader.ReadInt32();
			ChildCount = reader.ReadInt32();
			Unknown3 = reader.ReadInt32();
			NexMhiiId = reader.ReadInt32();
			Unknown5 = reader.ReadInt64();
			Unknown6 = reader.ReadInt64();
			Unknown7 = reader.ReadInt32();
			Unknown8 = reader.ReadInt32();
			Unknown9 = reader.ReadInt32();
			Unknown10 = reader.ReadInt32();
			Unknown11 = reader.ReadInt32();

			// Padded zeros
			reader.ReadBytes(HeaderLength - (int)reader.BaseStream.Position);
		}
	}
}
